package com.fare.taluo.auth.security;

import java.io.Serializable;

/**
 * 登陆凭证类
 * <p>一般地该类可以设置一些常用的用户信息,比如登陆用户ID，名称，当前角色等
 * @author xiangsf 2012-8-29
 *
 */
public class LogonUserCertificate implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -6183039260681298697L;

	private String loginId;
	/**
	 * 本地用户表ＩＤ，对应cfg_userinfo主键
	 */
	private Long localUserId;
	/**
	 * koala的用户表ＩＤ，对应ks_identity表主键
	 */
	private Long userId;
	
	private String userName;
	
	private Long roleId;
	
	private String roleName;
	
	private Long sourceId;
	
	private String sourceName;
	
	private String sourceKey;
	
	public LogonUserCertificate(){}
	public LogonUserCertificate(String loginId,Long localUserId, Long userId, String userName){
		this.loginId = loginId;
		this.localUserId = localUserId;
		this.userId = userId;
		this.userName = userName;
	}
	
	
	public LogonUserCertificate(String loginId,Long localUserId, Long userId, String userName,
			Long roleId, String roleName) {
		super();
		this.loginId = loginId;
		this.localUserId = localUserId;
		this.userId = userId;
		this.userName = userName;
		this.roleId = roleId;
		this.roleName = roleName;
	}
	public LogonUserCertificate(String loginId,Long localUserId, Long userId, String userName,
			Long roleId, String roleName, Long sourceId,
			String sourceName,String sourceKey) {
		super();
		this.loginId = loginId;
		this.localUserId = localUserId;
		this.userId = userId;
		this.userName = userName;
		this.roleId = roleId;
		this.roleName = roleName;
		this.sourceId = sourceId;
		this.sourceName = sourceName;
		this.sourceKey = sourceKey;
	}
	public String getLoginId() {
		return loginId;
	}
	public void setLoginId(String loginId) {
		this.loginId = loginId;
	}
	public Long getUserId() {
		return userId;
	}
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public Long getRoleId() {
		return roleId;
	}
	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}
	public String getRoleName() {
		return roleName;
	}
	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}
	public Long getSourceId() {
		return sourceId;
	}
	public void setSourceId(Long sourceId) {
		this.sourceId = sourceId;
	}
	
	public String getSourceKey() {
		return sourceKey;
	}
	public void setSourceKey(String sourceKey) {
		this.sourceKey = sourceKey;
	}

	public String getSourceName() {
		return sourceName;
	}
	public void setSourceName(String sourceName) {
		this.sourceName = sourceName;
	}
	
	public Long getLocalUserId() {
		return localUserId;
	}
	public void setLocalUserId(Long localUserId) {
		this.localUserId = localUserId;
	}
	
	@Override
	public String toString() {
		return "LogonUserCertificate [loginId=" + loginId + ", userId="
				+ userId + ", userName=" + userName + ", roleId=" + roleId
				+ ", roleName=" + roleName + ", sourceId=" + sourceId
				+ ", sourceName=" + sourceName + "]";
	}
	
	
}
